
/*
'===============================================================================
'  Generated From - CSharp_dOOdads_BusinessEntity.vbgen
' 
'  ** IMPORTANT  ** 
'  How to Generate your stored procedures:
' 
'  SQL        = SQL_StoredProcs.vbgen
'  ACCESS     = Access_StoredProcs.vbgen
'  ORACLE     = Oracle_StoredProcs.vbgen
'  FIREBIRD   = FirebirdStoredProcs.vbgen
'  POSTGRESQL = PostgreSQL_StoredProcs.vbgen
'
'  The supporting base class OracleClientEntity is in the Architecture directory in "dOOdads".
'  
'  This object is 'abstract' which means you need to inherit from it to be able
'  to instantiate it.  This is very easilly done. You can override properties and
'  methods in your derived class, this allows you to regenerate this class at any
'  time and not worry about overwriting custom code. 
'
'  NEVER EDIT THIS FILE.
'
'  public class YourObject :  _YourObject
'  {
'
'  }
'
'===============================================================================
*/

// Generated by MyGeneration Version # (1.1.3.5)

using System;
using System.Data;
using System.Data.OracleClient;
using System.Collections;
using System.Collections.Specialized;

using MyGeneration.dOOdads;

namespace MyGeneration.dOOdads.Tests.Oracle
{
	public abstract class _AGGREGATETEST : OracleClientEntity
	{
		public _AGGREGATETEST()
		{
			this.SchemaGlobal = "MYGENERATION.";
			this.QuerySource = "AGGREGATETEST";
			this.MappingName = "AGGREGATETEST";

		}	

		//=================================================================
		//  public Overrides void AddNew()
		//=================================================================
		//
		//=================================================================
		public override void AddNew()
		{
			base.AddNew();
			
		}
		
		
		public override void FlushData()
		{
			this._whereClause = null;
			this._aggregateClause = null;
			base.FlushData();
		}
		
		//=================================================================
		//  	public Function LoadAll() As Boolean
		//=================================================================
		//  Loads all of the records in the database, and sets the currentRow to the first row
		//=================================================================
		public bool LoadAll() 
		{
			ListDictionary parameters = null;
			
			parameters = new ListDictionary();	
			OracleParameter p = new OracleParameter("outCursor", OracleType.Cursor);
			p.Direction = ParameterDirection.Output;
			parameters.Add(p, null);
			
			return base.LoadFromSql(this.SchemaStoredProcedure + "PL_AGGREGATETEST", parameters);
		}
	
		//=================================================================
		// public Overridable Function LoadByPrimaryKey()  As Boolean
		//=================================================================
		//  Loads a single row of via the primary key
		//=================================================================
		public virtual bool LoadByPrimaryKey(decimal ID)
		{
			ListDictionary parameters = new ListDictionary();
			parameters.Add(Parameters.ID, ID);


			OracleParameter p = new OracleParameter("outCursor", OracleType.Cursor);
			p.Direction = ParameterDirection.Output;
			parameters.Add(p, null);
					
			return base.LoadFromSql(this.SchemaStoredProcedure + "PK_AGGREGATETEST", parameters);
		}
		
		#region Parameters
		protected class Parameters
		{
			
			public static OracleParameter ID
			{
				get
				{
					return new OracleParameter("p_ID", OracleType.Number, 0);
				}
			}
			
			public static OracleParameter DEPARTMENTID
			{
				get
				{
					return new OracleParameter("p_DEPARTMENTID", OracleType.Number, 0);
				}
			}
			
			public static OracleParameter FIRSTNAME
			{
				get
				{
					return new OracleParameter("p_FIRSTNAME", OracleType.VarChar, 25);
				}
			}
			
			public static OracleParameter LASTNAME
			{
				get
				{
					return new OracleParameter("p_LASTNAME", OracleType.VarChar, 15);
				}
			}
			
			public static OracleParameter AGE
			{
				get
				{
					return new OracleParameter("p_AGE", OracleType.Number, 0);
				}
			}
			
			public static OracleParameter HIREDATE
			{
				get
				{
					return new OracleParameter("p_HIREDATE", OracleType.DateTime, 0);
				}
			}
			
			public static OracleParameter SALARY
			{
				get
				{
					return new OracleParameter("p_SALARY", OracleType.Number, 0);
				}
			}
			
			public static OracleParameter ISACTIVE
			{
				get
				{
					return new OracleParameter("p_ISACTIVE", OracleType.Number, 0);
				}
			}
			
		}
		#endregion		
	
		#region ColumnNames
		public class ColumnNames
		{  
			public const string ID = "ID";
			public const string DEPARTMENTID = "DEPARTMENTID";
			public const string FIRSTNAME = "FIRSTNAME";
			public const string LASTNAME = "LASTNAME";
			public const string AGE = "AGE";
			public const string HIREDATE = "HIREDATE";
			public const string SALARY = "SALARY";
			public const string ISACTIVE = "ISACTIVE";

			static public string ToPropertyName(string columnName)
			{
				if(ht == null)
				{
					ht = new Hashtable();
					
					ht[ID] = _AGGREGATETEST.PropertyNames.ID;
					ht[DEPARTMENTID] = _AGGREGATETEST.PropertyNames.DEPARTMENTID;
					ht[FIRSTNAME] = _AGGREGATETEST.PropertyNames.FIRSTNAME;
					ht[LASTNAME] = _AGGREGATETEST.PropertyNames.LASTNAME;
					ht[AGE] = _AGGREGATETEST.PropertyNames.AGE;
					ht[HIREDATE] = _AGGREGATETEST.PropertyNames.HIREDATE;
					ht[SALARY] = _AGGREGATETEST.PropertyNames.SALARY;
					ht[ISACTIVE] = _AGGREGATETEST.PropertyNames.ISACTIVE;

				}
				return (string)ht[columnName];
			}

			static private Hashtable ht = null;			 
		}
		#endregion
		
		#region PropertyNames
		public class PropertyNames
		{  
			public const string ID = "ID";
			public const string DEPARTMENTID = "DEPARTMENTID";
			public const string FIRSTNAME = "FIRSTNAME";
			public const string LASTNAME = "LASTNAME";
			public const string AGE = "AGE";
			public const string HIREDATE = "HIREDATE";
			public const string SALARY = "SALARY";
			public const string ISACTIVE = "ISACTIVE";

			static public string ToColumnName(string propertyName)
			{
				if(ht == null)
				{
					ht = new Hashtable();
					
					ht[ID] = _AGGREGATETEST.ColumnNames.ID;
					ht[DEPARTMENTID] = _AGGREGATETEST.ColumnNames.DEPARTMENTID;
					ht[FIRSTNAME] = _AGGREGATETEST.ColumnNames.FIRSTNAME;
					ht[LASTNAME] = _AGGREGATETEST.ColumnNames.LASTNAME;
					ht[AGE] = _AGGREGATETEST.ColumnNames.AGE;
					ht[HIREDATE] = _AGGREGATETEST.ColumnNames.HIREDATE;
					ht[SALARY] = _AGGREGATETEST.ColumnNames.SALARY;
					ht[ISACTIVE] = _AGGREGATETEST.ColumnNames.ISACTIVE;

				}
				return (string)ht[propertyName];
			}

			static private Hashtable ht = null;			 
		}			 
		#endregion	

		#region StringPropertyNames
		public class StringPropertyNames
		{  
			public const string ID = "s_ID";
			public const string DEPARTMENTID = "s_DEPARTMENTID";
			public const string FIRSTNAME = "s_FIRSTNAME";
			public const string LASTNAME = "s_LASTNAME";
			public const string AGE = "s_AGE";
			public const string HIREDATE = "s_HIREDATE";
			public const string SALARY = "s_SALARY";
			public const string ISACTIVE = "s_ISACTIVE";

		}
		#endregion		
		
		#region Properties
	
		public virtual decimal ID
		{
			get
			{
				return base.Getdecimal(ColumnNames.ID);
			}
			set
			{
				base.Setdecimal(ColumnNames.ID, value);
			}
		}

		public virtual decimal DEPARTMENTID
		{
			get
			{
				return base.Getdecimal(ColumnNames.DEPARTMENTID);
			}
			set
			{
				base.Setdecimal(ColumnNames.DEPARTMENTID, value);
			}
		}

		public virtual string FIRSTNAME
		{
			get
			{
				return base.Getstring(ColumnNames.FIRSTNAME);
			}
			set
			{
				base.Setstring(ColumnNames.FIRSTNAME, value);
			}
		}

		public virtual string LASTNAME
		{
			get
			{
				return base.Getstring(ColumnNames.LASTNAME);
			}
			set
			{
				base.Setstring(ColumnNames.LASTNAME, value);
			}
		}

		public virtual decimal AGE
		{
			get
			{
				return base.Getdecimal(ColumnNames.AGE);
			}
			set
			{
				base.Setdecimal(ColumnNames.AGE, value);
			}
		}

		public virtual DateTime HIREDATE
		{
			get
			{
				return base.GetDateTime(ColumnNames.HIREDATE);
			}
			set
			{
				base.SetDateTime(ColumnNames.HIREDATE, value);
			}
		}

		public virtual decimal SALARY
		{
			get
			{
				return base.Getdecimal(ColumnNames.SALARY);
			}
			set
			{
				base.Setdecimal(ColumnNames.SALARY, value);
			}
		}

		public virtual decimal ISACTIVE
		{
			get
			{
				return base.Getdecimal(ColumnNames.ISACTIVE);
			}
			set
			{
				base.Setdecimal(ColumnNames.ISACTIVE, value);
			}
		}


		#endregion
		
		#region String Properties
	
		public virtual string s_ID
		{
			get
			{
				return this.IsColumnNull(ColumnNames.ID) ? string.Empty : base.GetdecimalAsString(ColumnNames.ID);
			}
			set
			{
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.ID);
				else
					this.ID = base.SetdecimalAsString(ColumnNames.ID, value);
			}
		}

		public virtual string s_DEPARTMENTID
		{
			get
			{
				return this.IsColumnNull(ColumnNames.DEPARTMENTID) ? string.Empty : base.GetdecimalAsString(ColumnNames.DEPARTMENTID);
			}
			set
			{
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.DEPARTMENTID);
				else
					this.DEPARTMENTID = base.SetdecimalAsString(ColumnNames.DEPARTMENTID, value);
			}
		}

		public virtual string s_FIRSTNAME
		{
			get
			{
				return this.IsColumnNull(ColumnNames.FIRSTNAME) ? string.Empty : base.GetstringAsString(ColumnNames.FIRSTNAME);
			}
			set
			{
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.FIRSTNAME);
				else
					this.FIRSTNAME = base.SetstringAsString(ColumnNames.FIRSTNAME, value);
			}
		}

		public virtual string s_LASTNAME
		{
			get
			{
				return this.IsColumnNull(ColumnNames.LASTNAME) ? string.Empty : base.GetstringAsString(ColumnNames.LASTNAME);
			}
			set
			{
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.LASTNAME);
				else
					this.LASTNAME = base.SetstringAsString(ColumnNames.LASTNAME, value);
			}
		}

		public virtual string s_AGE
		{
			get
			{
				return this.IsColumnNull(ColumnNames.AGE) ? string.Empty : base.GetdecimalAsString(ColumnNames.AGE);
			}
			set
			{
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.AGE);
				else
					this.AGE = base.SetdecimalAsString(ColumnNames.AGE, value);
			}
		}

		public virtual string s_HIREDATE
		{
			get
			{
				return this.IsColumnNull(ColumnNames.HIREDATE) ? string.Empty : base.GetDateTimeAsString(ColumnNames.HIREDATE);
			}
			set
			{
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.HIREDATE);
				else
					this.HIREDATE = base.SetDateTimeAsString(ColumnNames.HIREDATE, value);
			}
		}

		public virtual string s_SALARY
		{
			get
			{
				return this.IsColumnNull(ColumnNames.SALARY) ? string.Empty : base.GetdecimalAsString(ColumnNames.SALARY);
			}
			set
			{
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.SALARY);
				else
					this.SALARY = base.SetdecimalAsString(ColumnNames.SALARY, value);
			}
		}

		public virtual string s_ISACTIVE
		{
			get
			{
				return this.IsColumnNull(ColumnNames.ISACTIVE) ? string.Empty : base.GetdecimalAsString(ColumnNames.ISACTIVE);
			}
			set
			{
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.ISACTIVE);
				else
					this.ISACTIVE = base.SetdecimalAsString(ColumnNames.ISACTIVE, value);
			}
		}


		#endregion		
	
		#region Where Clause
		public class WhereClause
		{
			public WhereClause(BusinessEntity entity)
			{
				this._entity = entity;
			}
			
			public TearOffWhereParameter TearOff
			{
				get
				{
					if(_tearOff == null)
					{
						_tearOff = new TearOffWhereParameter(this);
					}

					return _tearOff;
				}
			}

			#region WhereParameter TearOff's
			public class TearOffWhereParameter
			{
				public TearOffWhereParameter(WhereClause clause)
				{
					this._clause = clause;
				}
				
				
				public WhereParameter ID
				{
					get
					{
						WhereParameter where = new WhereParameter(ColumnNames.ID, Parameters.ID);
						this._clause._entity.Query.AddWhereParameter(where);
						return where;
					}
				}

				public WhereParameter DEPARTMENTID
				{
					get
					{
						WhereParameter where = new WhereParameter(ColumnNames.DEPARTMENTID, Parameters.DEPARTMENTID);
						this._clause._entity.Query.AddWhereParameter(where);
						return where;
					}
				}

				public WhereParameter FIRSTNAME
				{
					get
					{
						WhereParameter where = new WhereParameter(ColumnNames.FIRSTNAME, Parameters.FIRSTNAME);
						this._clause._entity.Query.AddWhereParameter(where);
						return where;
					}
				}

				public WhereParameter LASTNAME
				{
					get
					{
						WhereParameter where = new WhereParameter(ColumnNames.LASTNAME, Parameters.LASTNAME);
						this._clause._entity.Query.AddWhereParameter(where);
						return where;
					}
				}

				public WhereParameter AGE
				{
					get
					{
						WhereParameter where = new WhereParameter(ColumnNames.AGE, Parameters.AGE);
						this._clause._entity.Query.AddWhereParameter(where);
						return where;
					}
				}

				public WhereParameter HIREDATE
				{
					get
					{
						WhereParameter where = new WhereParameter(ColumnNames.HIREDATE, Parameters.HIREDATE);
						this._clause._entity.Query.AddWhereParameter(where);
						return where;
					}
				}

				public WhereParameter SALARY
				{
					get
					{
						WhereParameter where = new WhereParameter(ColumnNames.SALARY, Parameters.SALARY);
						this._clause._entity.Query.AddWhereParameter(where);
						return where;
					}
				}

				public WhereParameter ISACTIVE
				{
					get
					{
						WhereParameter where = new WhereParameter(ColumnNames.ISACTIVE, Parameters.ISACTIVE);
						this._clause._entity.Query.AddWhereParameter(where);
						return where;
					}
				}


				private WhereClause _clause;
			}
			#endregion
		
			public WhereParameter ID
			{
				get
				{
					if(_ID_W == null)
					{
						_ID_W = TearOff.ID;
					}
					return _ID_W;
				}
			}

			public WhereParameter DEPARTMENTID
			{
				get
				{
					if(_DEPARTMENTID_W == null)
					{
						_DEPARTMENTID_W = TearOff.DEPARTMENTID;
					}
					return _DEPARTMENTID_W;
				}
			}

			public WhereParameter FIRSTNAME
			{
				get
				{
					if(_FIRSTNAME_W == null)
					{
						_FIRSTNAME_W = TearOff.FIRSTNAME;
					}
					return _FIRSTNAME_W;
				}
			}

			public WhereParameter LASTNAME
			{
				get
				{
					if(_LASTNAME_W == null)
					{
						_LASTNAME_W = TearOff.LASTNAME;
					}
					return _LASTNAME_W;
				}
			}

			public WhereParameter AGE
			{
				get
				{
					if(_AGE_W == null)
					{
						_AGE_W = TearOff.AGE;
					}
					return _AGE_W;
				}
			}

			public WhereParameter HIREDATE
			{
				get
				{
					if(_HIREDATE_W == null)
					{
						_HIREDATE_W = TearOff.HIREDATE;
					}
					return _HIREDATE_W;
				}
			}

			public WhereParameter SALARY
			{
				get
				{
					if(_SALARY_W == null)
					{
						_SALARY_W = TearOff.SALARY;
					}
					return _SALARY_W;
				}
			}

			public WhereParameter ISACTIVE
			{
				get
				{
					if(_ISACTIVE_W == null)
					{
						_ISACTIVE_W = TearOff.ISACTIVE;
					}
					return _ISACTIVE_W;
				}
			}

			private WhereParameter _ID_W = null;
			private WhereParameter _DEPARTMENTID_W = null;
			private WhereParameter _FIRSTNAME_W = null;
			private WhereParameter _LASTNAME_W = null;
			private WhereParameter _AGE_W = null;
			private WhereParameter _HIREDATE_W = null;
			private WhereParameter _SALARY_W = null;
			private WhereParameter _ISACTIVE_W = null;

			public void WhereClauseReset()
			{
				_ID_W = null;
				_DEPARTMENTID_W = null;
				_FIRSTNAME_W = null;
				_LASTNAME_W = null;
				_AGE_W = null;
				_HIREDATE_W = null;
				_SALARY_W = null;
				_ISACTIVE_W = null;

				this._entity.Query.FlushWhereParameters();

			}
	
			private BusinessEntity _entity;
			private TearOffWhereParameter _tearOff;
			
		}
	
		public WhereClause Where
		{
			get
			{
				if(_whereClause == null)
				{
					_whereClause = new WhereClause(this);
				}
		
				return _whereClause;
			}
		}
		
		private WhereClause _whereClause = null;	
		#endregion
	
		#region Aggregate Clause
		public class AggregateClause
		{
			public AggregateClause(BusinessEntity entity)
			{
				this._entity = entity;
			}
			
			public TearOffAggregateParameter TearOff
			{
				get
				{
					if(_tearOff == null)
					{
						_tearOff = new TearOffAggregateParameter(this);
					}

					return _tearOff;
				}
			}

			#region AggregateParameter TearOff's
			public class TearOffAggregateParameter
			{
				public TearOffAggregateParameter(AggregateClause clause)
				{
					this._clause = clause;
				}
				
				
				public AggregateParameter ID
				{
					get
					{
						AggregateParameter aggregate = new AggregateParameter(ColumnNames.ID, Parameters.ID);
						this._clause._entity.Query.AddAggregateParameter(aggregate);
						return aggregate;
					}
				}

				public AggregateParameter DEPARTMENTID
				{
					get
					{
						AggregateParameter aggregate = new AggregateParameter(ColumnNames.DEPARTMENTID, Parameters.DEPARTMENTID);
						this._clause._entity.Query.AddAggregateParameter(aggregate);
						return aggregate;
					}
				}

				public AggregateParameter FIRSTNAME
				{
					get
					{
						AggregateParameter aggregate = new AggregateParameter(ColumnNames.FIRSTNAME, Parameters.FIRSTNAME);
						this._clause._entity.Query.AddAggregateParameter(aggregate);
						return aggregate;
					}
				}

				public AggregateParameter LASTNAME
				{
					get
					{
						AggregateParameter aggregate = new AggregateParameter(ColumnNames.LASTNAME, Parameters.LASTNAME);
						this._clause._entity.Query.AddAggregateParameter(aggregate);
						return aggregate;
					}
				}

				public AggregateParameter AGE
				{
					get
					{
						AggregateParameter aggregate = new AggregateParameter(ColumnNames.AGE, Parameters.AGE);
						this._clause._entity.Query.AddAggregateParameter(aggregate);
						return aggregate;
					}
				}

				public AggregateParameter HIREDATE
				{
					get
					{
						AggregateParameter aggregate = new AggregateParameter(ColumnNames.HIREDATE, Parameters.HIREDATE);
						this._clause._entity.Query.AddAggregateParameter(aggregate);
						return aggregate;
					}
				}

				public AggregateParameter SALARY
				{
					get
					{
						AggregateParameter aggregate = new AggregateParameter(ColumnNames.SALARY, Parameters.SALARY);
						this._clause._entity.Query.AddAggregateParameter(aggregate);
						return aggregate;
					}
				}

				public AggregateParameter ISACTIVE
				{
					get
					{
						AggregateParameter aggregate = new AggregateParameter(ColumnNames.ISACTIVE, Parameters.ISACTIVE);
						this._clause._entity.Query.AddAggregateParameter(aggregate);
						return aggregate;
					}
				}


				private AggregateClause _clause;
			}
			#endregion
		
			public AggregateParameter ID
			{
				get
				{
					if(_ID_W == null)
					{
						_ID_W = TearOff.ID;
					}
					return _ID_W;
				}
			}

			public AggregateParameter DEPARTMENTID
			{
				get
				{
					if(_DEPARTMENTID_W == null)
					{
						_DEPARTMENTID_W = TearOff.DEPARTMENTID;
					}
					return _DEPARTMENTID_W;
				}
			}

			public AggregateParameter FIRSTNAME
			{
				get
				{
					if(_FIRSTNAME_W == null)
					{
						_FIRSTNAME_W = TearOff.FIRSTNAME;
					}
					return _FIRSTNAME_W;
				}
			}

			public AggregateParameter LASTNAME
			{
				get
				{
					if(_LASTNAME_W == null)
					{
						_LASTNAME_W = TearOff.LASTNAME;
					}
					return _LASTNAME_W;
				}
			}

			public AggregateParameter AGE
			{
				get
				{
					if(_AGE_W == null)
					{
						_AGE_W = TearOff.AGE;
					}
					return _AGE_W;
				}
			}

			public AggregateParameter HIREDATE
			{
				get
				{
					if(_HIREDATE_W == null)
					{
						_HIREDATE_W = TearOff.HIREDATE;
					}
					return _HIREDATE_W;
				}
			}

			public AggregateParameter SALARY
			{
				get
				{
					if(_SALARY_W == null)
					{
						_SALARY_W = TearOff.SALARY;
					}
					return _SALARY_W;
				}
			}

			public AggregateParameter ISACTIVE
			{
				get
				{
					if(_ISACTIVE_W == null)
					{
						_ISACTIVE_W = TearOff.ISACTIVE;
					}
					return _ISACTIVE_W;
				}
			}

			private AggregateParameter _ID_W = null;
			private AggregateParameter _DEPARTMENTID_W = null;
			private AggregateParameter _FIRSTNAME_W = null;
			private AggregateParameter _LASTNAME_W = null;
			private AggregateParameter _AGE_W = null;
			private AggregateParameter _HIREDATE_W = null;
			private AggregateParameter _SALARY_W = null;
			private AggregateParameter _ISACTIVE_W = null;

			public void AggregateClauseReset()
			{
				_ID_W = null;
				_DEPARTMENTID_W = null;
				_FIRSTNAME_W = null;
				_LASTNAME_W = null;
				_AGE_W = null;
				_HIREDATE_W = null;
				_SALARY_W = null;
				_ISACTIVE_W = null;

				this._entity.Query.FlushAggregateParameters();

			}
	
			private BusinessEntity _entity;
			private TearOffAggregateParameter _tearOff;
			
		}
	
		public AggregateClause Aggregate
		{
			get
			{
				if(_aggregateClause == null)
				{
					_aggregateClause = new AggregateClause(this);
				}
		
				return _aggregateClause;
			}
		}
		
		private AggregateClause _aggregateClause = null;	
		#endregion
	
		protected override IDbCommand GetInsertCommand() 
		{
		
			OracleCommand cmd = new OracleCommand();
			cmd.CommandType = CommandType.StoredProcedure;
			cmd.CommandText = this.SchemaStoredProcedure + "PI_AGGREGATETEST";
	
			CreateParameters(cmd);
			
			OracleParameter p;
			p = cmd.Parameters[Parameters.ID.ParameterName];
			p.Direction = ParameterDirection.Output;
    
			return cmd;
		}
	
		protected override IDbCommand GetUpdateCommand()
		{
		
			OracleCommand cmd = new OracleCommand();
			cmd.CommandType = CommandType.StoredProcedure;
			cmd.CommandText = this.SchemaStoredProcedure + "PU_AGGREGATETEST";
	
			CreateParameters(cmd);
			      
			return cmd;
		}
	
		protected override IDbCommand GetDeleteCommand()
		{
		
			OracleCommand cmd = new OracleCommand();
			cmd.CommandType = CommandType.StoredProcedure;
			cmd.CommandText = this.SchemaStoredProcedure + "PD_AGGREGATETEST";
	
			OracleParameter p;
			p = cmd.Parameters.Add(Parameters.ID);
			p.SourceColumn = ColumnNames.ID;
			p.SourceVersion = DataRowVersion.Current;

  
			return cmd;
		}
		
		private IDbCommand CreateParameters(OracleCommand cmd)
		{
			OracleParameter p;
		
			p = cmd.Parameters.Add(Parameters.ID);
			p.SourceColumn = ColumnNames.ID;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.DEPARTMENTID);
			p.SourceColumn = ColumnNames.DEPARTMENTID;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.FIRSTNAME);
			p.SourceColumn = ColumnNames.FIRSTNAME;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.LASTNAME);
			p.SourceColumn = ColumnNames.LASTNAME;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.AGE);
			p.SourceColumn = ColumnNames.AGE;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.HIREDATE);
			p.SourceColumn = ColumnNames.HIREDATE;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.SALARY);
			p.SourceColumn = ColumnNames.SALARY;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.ISACTIVE);
			p.SourceColumn = ColumnNames.ISACTIVE;
			p.SourceVersion = DataRowVersion.Current;


			return cmd;
		}
	}
}


